<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <link rel="stylesheet" type="text/css" href="/Public/Admin/lib/bootstrap/css/bootstrap.min.css"/>
	    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/base.css"/>
	    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/style.css"/>
		<script type="text/javascript" src="/Public/Admin/lib/bootstrap/js/jquery.min.js" ></script>
		<script type="text/javascript" src="/Public/Admin/lib/bootstrap/js/bootstrap.min.js" ></script>
		<script type="text/javascript" src="/Public/Admin/js/shacha.js" ></script>
	</head>
	<style>
	a:hover {   
 
text-decoration: none;   
}   
	</style>
	<body  style="background:transparent;">
			   
				<div class="pad-20">
					<div class="panel panel-default linear">
					  	<div class="panel-heading title">奖金管理</div>
					  	<div class="panel-body">
					  		<link rel="stylesheet" type="text/css" href="/Public/Admin/lib/jedate/skin/jedate.css"/>
					  		<script type="text/javascript" src="/Public/Admin/lib/jedate/jedate.min.js" ></script>
					  		<div class="pad-20">
					  			<form class="form-inline" action="/Admin/Index/reward" method="get">
					  			<!--<div class="form-group">
								    
								   <input placeholder="输入会员关键字" name="key" value="" class="form-control " style="" type="text"> 
								  </div>-->
								  <div class="form-group">
			                            <div class="input-group">
			                                <div class="input-group-addon">开始时间</div>
			                                <input id="start_time" name="start_time" class="form-control stu1" type="text" placeholder="输入开始日期" value="<?php echo ($s1); ?>">
			                            </div>
			                        </div>
			                        <div class="form-group">
			                            <div class="input-group">
			                                <div class="input-group-addon">结束时间</div>
			                                <input id="end_time" name="end_time" class="form-control stu2" type="text" placeholder="输入结束日期" value="<?php echo ($s2); ?>">
			                            </div>
			                        </div>
								  <button type="submit" class="btn btn-default">查询</button>
								</form>
								
							
								
								<div class="pad-20"></div>
								<div class="table-responsive">
								  <table class="table">
								    <tr>
							    		<th>会员账号</th>
							    		<th>奖金类型</th>
										<th>奖金额度</th>
										<th>产生时间</th>
										
										<th>奖金原因</th>
										<th>状态</th>
										<th>操作</th>
								    </tr>
								    <tbody>
									<?php if(is_array($list)): foreach($list as $key=>$v): ?><tr>
									 <td><?php echo ($v["account"]); ?></td>
									 <td><?php if($v["typemoney"] == '1'): ?>静态分红<?php endif; ?>
									 <?php if($v["typemoney"] == '2'): ?>直推奖<?php endif; ?>
									  <?php if($v["typemoney"] == '3'): ?>管理奖<?php endif; ?>
									 </td>
									  <td><?php echo ($v["money"]); ?></td>
								      <td><?php echo ($v["times_c"]); ?></td>
									
									 <td><?php echo ($v["title"]); ?></td>
									 <td><?php if($v["status"] == '0'): ?>未发放<?php endif; ?>
									 <?php if($v["status"] == '1'): ?>已发放<?php endif; ?></td>
									  <td><a onclick="return del(<?=$v['id']?>);" class="btn btn-primary btn-xs btn-danger">删除</a> </td>
									</tr><?php endforeach; endif; ?>
								</tbody>
									 
								    
								  </table>
								</div>
								<div class="f-right">
								  <ul class="pagination">
								     <?php echo ($page); ?>
								  </ul>
								</div>
								<script type="text/javascript">
		                            jeDate({
		                                dateCell:".stu1",
		                                format:"YYYY-MM-DD",
		                                isTime:false,
		                                minDate:"1900-1-1",
		                                maxDate:"2099-12-12"
		                            });
		                            jeDate({
		                                dateCell:".stu2",
		                                format:"YYYY-MM-DD",
		                                isTime:false,
		                                minDate:"1900-1-1",
		                                maxDate:"2099-12-12"
		                            });
		                        </script>
					  		</div>
					  	</div>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
<link href="/Public/Admin/css/sweetalert/sweetalert.css" rel="stylesheet">
 <script src="/Public/Admin/js/sweetalert/sweetalert.min.js"></script>
 <script type="text/javascript" src="/Public/Admin/lib/bootstrap/js/jquery.min.js" ></script>
<script type="text/javascript" src="/Public/Admin/lib/bootstrap/js/bootstrap.min.js" ></script>
<script type="text/javascript" src="/Public/Admin/js/shacha.js" ></script>
 <script>

 function del(id) {
		swal({
			title: "您确定要删除这条信息吗",
			text: "删除后将无法恢复，请谨慎操作！",
			type: "warning",
			showCancelButton: true,
			confirmButtonColor: "#DD6B55",
			confirmButtonText: "删除",
			closeOnConfirm: false
		}, function () {
			$.ajax({
				type:'post',      
				url:'/Admin/Index/del_reward',
				data:{id:id},  
				cache:false,
				dataType:'json',  
				success:function(data){
					if (data.message == '操作成功！') {
						swal(data.message, "", "success");
						//window.location.reload();
					} else {
						swal(data.message, "", "error");
					}
				}
			});
			
		});
	}
 </script>